package model.system;
// Generated Nov 13, 2012 9:40:56 PM by Hibernate Tools 3.2.1.GA


import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

/**
 * SystemNumberingGen generated by hbm2java
 */
@Entity
@Table(name="system_numbering_gen", schema="public")
@Cache(usage=CacheConcurrencyStrategy.READ_WRITE)
public class SystemNumberingGen  implements java.io.Serializable {

    private SystemNumberingGenId id;
    private SystemNumbering systemNumbering;
    private String currentNo;

    public SystemNumberingGen() {
    }

    public SystemNumberingGen(SystemNumberingGenId id, SystemNumbering systemNumbering, String currentNo) {
        this.id = id;
        this.systemNumbering = systemNumbering;
        this.currentNo = currentNo;
    }
    

    @EmbeddedId
    @AttributeOverrides( {
        @AttributeOverride(name="id", column=@Column(name="id", nullable=false) ), 
        @AttributeOverride(name="generatorValue", column=@Column(name="generator_value", nullable=false, length=40) ) } )
    public SystemNumberingGenId getId() {
        return this.id;
    }
    
    public void setId(SystemNumberingGenId id) {
        this.id = id;
    }
    
    @ManyToOne
    @JoinColumn(name="id", nullable=false, insertable=false, updatable=false)
    public SystemNumbering getSystemNumbering() {
        return this.systemNumbering;
    }
    
    public void setSystemNumbering(SystemNumbering systemNumbering) {
        this.systemNumbering = systemNumbering;
    }
    
    @Column(name="current_no", length=40)
    public String getCurrentNo() {
        return this.currentNo;
    }
    
    public void setCurrentNo(String currentNo) {
        this.currentNo = currentNo;
    }

}


